<?php

namespace App\Admin\Actions\ShopProduct;

use App\Models\WithdrawModel;
use Encore\Admin\Actions\Response;
use Encore\Admin\Actions\RowAction;
use Illuminate\Http\Request;

class ShopProductEditAction extends RowAction
{
    public $name = '编辑';

    /**
     * handle
     * @return string
     */
    public function href(): string
    {
        $id = $this->row->product_id;
        if ($this->row->product_category_id_1 === 1) return "shopProductAnimal/$id/edit";
        else return "shopProductFeed/$id/edit";
    }
}
